Optimal. Leaf size=179 \[ -\frac{1}{8} (2 d-f) \log \left (x^2-x+1\right )+\frac{1}{8} (2 d-f) \log \left (x^2+x+1\right )+\frac{x \left (x^2 (-(d-2 f))+d+f\right )}{6 \left (x^4+x^2+1\right )}-\frac{(4 d+f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{12 \sqrt{3}}+\frac{(4 d+f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{12 \sqrt{3}}+\frac{(2 e-g) \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{3 \sqrt{3}}+\frac{x^2 (2 e-g)+e-2 g}{6 \left (x^4+x^2+1\right )} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.347542, antiderivative size = 179, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 9, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.346 \[ -\frac{1}{8} (2 d-f) \log \left (x^2-x+1\right )+\frac{1}{8} (2 d-f) \log \left (x^2+x+1\right )+\frac{x \left (x^2 (-(d-2 f))+d+f\right )}{6 \left (x^4+x^2+1\right )}-\frac{(4 d+f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{12 \sqrt{3}}+\frac{(4 d+f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{12 \sqrt{3}}+\frac{(2 e-g) \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{3 \sqrt{3}}+\frac{x^2 (2 e-g)+e-2 g}{6 \left (x^4+x^2+1\right )} \]
Antiderivative was successfully verified.
[In] Int[(d + e*x + f*x^2 + g*x^3)/(1 + x^2 + x^4)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 59.4685, size = 151, normalized size = 0.84 \[ \frac{x \left (d + f - x^{3} \left (e - 2 g\right ) - x^{2} \left (d - 2 f\right ) + x \left (e + g\right )\right )}{6 \left (x^{4} + x^{2} + 1\right )} - \left (\frac{d}{4} - \frac{f}{8}\right ) \log{\left (x^{2} - x + 1 \right )} + \left (\frac{d}{4} - \frac{f}{8}\right ) \log{\left (x^{2} + x + 1 \right )} + \frac{\sqrt{3} \left (4 d + f\right ) \operatorname{atan}{\left (\sqrt{3} \left (\frac{2 x}{3} - \frac{1}{3}\right ) \right )}}{36} + \frac{\sqrt{3} \left (4 d + f\right ) \operatorname{atan}{\left (\sqrt{3} \left (\frac{2 x}{3} + \frac{1}{3}\right ) \right )}}{36} + \frac{\sqrt{3} \left (2 e - g\right ) \operatorname{atan}{\left (\sqrt{3} \left (\frac{2 x^{2}}{3} + \frac{1}{3}\right ) \right )}}{9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((g*x**3+f*x**2+e*x+d)/(x**4+x**2+1)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [C] time = 0.979685, size = 200, normalized size = 1.12 \[ \frac{1}{36} \left (\frac{6 \left (x \left (-d x^2+d+2 f x^2+f\right )+2 e x^2+e-g \left (x^2+2\right )\right )}{x^4+x^2+1}-\frac{\left (\left (\sqrt{3}-11 i\right ) d-2 \left (\sqrt{3}-2 i\right ) f\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}-i\right ) x\right )}{\sqrt{\frac{1}{6} \left (1+i \sqrt{3}\right )}}-\frac{\left (\left (\sqrt{3}+11 i\right ) d-2 \left (\sqrt{3}+2 i\right ) f\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}+i\right ) x\right )}{\sqrt{\frac{1}{6} \left (1-i \sqrt{3}\right )}}-4 \sqrt{3} (2 e-g) \tan ^{-1}\left (\frac{\sqrt{3}}{2 x^2+1}\right )\right ) \]
Warning: Unable to verify antiderivative.
[In] Integrate[(d + e*x + f*x^2 + g*x^3)/(1 + x^2 + x^4)^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.016, size = 260, normalized size = 1.5 \[{\frac{1}{4\,{x}^{2}+4\,x+4} \left ( \left ( -{\frac{d}{3}}-{\frac{e}{3}}-{\frac{g}{3}}+{\frac{2\,f}{3}} \right ) x-{\frac{2\,d}{3}}+{\frac{e}{3}}-{\frac{2\,g}{3}}+{\frac{f}{3}} \right ) }+{\frac{d\ln \left ({x}^{2}+x+1 \right ) }{4}}-{\frac{\ln \left ({x}^{2}+x+1 \right ) f}{8}}+{\frac{d\sqrt{3}}{9}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{2\,\sqrt{3}e}{9}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{36}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}g}{9}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{1}{4\,{x}^{2}-4\,x+4} \left ( \left ({\frac{d}{3}}-{\frac{e}{3}}-{\frac{g}{3}}-{\frac{2\,f}{3}} \right ) x-{\frac{2\,d}{3}}-{\frac{e}{3}}+{\frac{2\,g}{3}}+{\frac{f}{3}} \right ) }-{\frac{d\ln \left ({x}^{2}-x+1 \right ) }{4}}+{\frac{\ln \left ({x}^{2}-x+1 \right ) f}{8}}+{\frac{d\sqrt{3}}{9}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{2\,\sqrt{3}e}{9}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{36}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }-{\frac{\sqrt{3}g}{9}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((g*x^3+f*x^2+e*x+d)/(x^4+x^2+1)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.780339, size = 182, normalized size = 1.02 \[ \frac{1}{36} \, \sqrt{3}{\left (4 \, d - 8 \, e + f + 4 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{36} \, \sqrt{3}{\left (4 \, d + 8 \, e + f - 4 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{8} \,{\left (2 \, d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{8} \,{\left (2 \, d - f\right )} \log \left (x^{2} - x + 1\right ) - \frac{{\left (d - 2 \, f\right )} x^{3} -{\left (2 \, e - g\right )} x^{2} -{\left (d + f\right )} x - e + 2 \, g}{6 \,{\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^3 + f*x^2 + e*x + d)/(x^4 + x^2 + 1)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.475966, size = 333, normalized size = 1.86 \[ \frac{\sqrt{3}{\left (3 \, \sqrt{3}{\left ({\left (2 \, d - f\right )} x^{4} +{\left (2 \, d - f\right )} x^{2} + 2 \, d - f\right )} \log \left (x^{2} + x + 1\right ) - 3 \, \sqrt{3}{\left ({\left (2 \, d - f\right )} x^{4} +{\left (2 \, d - f\right )} x^{2} + 2 \, d - f\right )} \log \left (x^{2} - x + 1\right ) + 2 \,{\left ({\left (4 \, d - 8 \, e + f + 4 \, g\right )} x^{4} +{\left (4 \, d - 8 \, e + f + 4 \, g\right )} x^{2} + 4 \, d - 8 \, e + f + 4 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + 2 \,{\left ({\left (4 \, d + 8 \, e + f - 4 \, g\right )} x^{4} +{\left (4 \, d + 8 \, e + f - 4 \, g\right )} x^{2} + 4 \, d + 8 \, e + f - 4 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) - 4 \, \sqrt{3}{\left ({\left (d - 2 \, f\right )} x^{3} -{\left (2 \, e - g\right )} x^{2} -{\left (d + f\right )} x - e + 2 \, g\right )}\right )}}{72 \,{\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^3 + f*x^2 + e*x + d)/(x^4 + x^2 + 1)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x**3+f*x**2+e*x+d)/(x**4+x**2+1)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.27488, size = 192, normalized size = 1.07 \[ \frac{1}{36} \, \sqrt{3}{\left (4 \, d + f + 4 \, g - 8 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{36} \, \sqrt{3}{\left (4 \, d + f - 4 \, g + 8 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{8} \,{\left (2 \, d - f\right )}{\rm ln}\left (x^{2} + x + 1\right ) - \frac{1}{8} \,{\left (2 \, d - f\right )}{\rm ln}\left (x^{2} - x + 1\right ) - \frac{d x^{3} - 2 \, f x^{3} + g x^{2} - 2 \, x^{2} e - d x - f x + 2 \, g - e}{6 \,{\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^3 + f*x^2 + e*x + d)/(x^4 + x^2 + 1)^2,x, algorithm="giac")
[Out]